<div id="sidebar">      
  <div id="search">
    <?php 
      echo $this->Form->create(null, array('url' => array('admin' => false, 'controller' => 'calls', 'action' => 'search'), 'class' => 'search_box'));
    
      echo $this->Form->input('Hľadať', array('div' => false, 'label' => false, 'type' => 'text', 'name' => 'search', 'alt' => 'Hľadaj', 'id' => 'search_box', 'value' => $this->Session->check('Search.search') ? $this->Session->read('Search.search') : 'Hľadaj', 'onfocus' => 'get_focus(this)', 'onblur' => 'lose_focus(this)'));
      
      echo $this->Form->button('Hľadaj', array('div' => false, 'type' => 'submit', 'class' => 'bold rounded bordered gradient'));
      
      echo '<strong>Ktritéria:</strong>';
      if($this->Session->read('Search.callName') == false AND $this->Session->read('Search.description') == false AND $this->Session->read('Search.agencyName') == false)
      	echo $this->Form->input('callName', array('div' => false, 'id' => 'search_option1', 'label' => 'Názov výzvy', 'type' => 'checkbox', 'name' => 'callName', 'checked' => true, 'onclick' => 'alast_one();'));
      else 
      	echo $this->Form->input('callName', array('div' => false, 'id' => 'search_option1', 'label' => 'Názov výzvy', 'type' => 'checkbox', 'name' => 'callName', 'checked' => $this->Session->read('Search.callName'), 'onclick' => 'alast_one();'));
      echo $this->Form->input('description', array('div' => false, 'id' => 'search_option2', 'label' => 'Popis výzvy', 'type' => 'checkbox', 'name' => 'description', 'checked' => $this->Session->read('Search.description'), 'onclick' => 'alast_one();'));
      echo $this->Form->input('agencyName', array('div' => false, 'id' => 'search_option3', 'label' =>  'Meno agentúry','type' => 'checkbox', 'name' => 'agencyName', 'checked' => $this->Session->read('Search.agencyName'), 'onclick' => 'alast_one();'));
      
      echo $this->Form->end();
    ?>
  </div>
</div>